#ifndef FRIENDITEM_H
#define FRIENDITEM_H

#include <QWidget>
#include "userdata.h"
#include <memory>
namespace Ui {
class FriendItem;
}

class FriendItem : public QWidget
{
    Q_OBJECT

public:
    explicit FriendItem(QWidget *parent = nullptr);
    ~FriendItem();

private:
    Ui::FriendItem *ui;
    std::shared_ptr<FriendInfo> _friendInfo;
signals:
    void sig_friendClicked(std::shared_ptr<FriendInfo>);

public:
    void setFriendInfo(std::shared_ptr<FriendInfo>);

    // QWidget interface
protected:
    virtual void paintEvent(QPaintEvent *event) override;

    // QWidget interface
protected:
    virtual void mousePressEvent(QMouseEvent *event) override;
};

#endif // FRIENDITEM_H
